package com.github.netty.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author ArchieSean
 * @description 配置文件
 * @date 2024-08-11
 */
@ConfigurationProperties(prefix = "spring.netty")
public class NettyProperties {

    /**
     * netty服务的端口，【必须】
     */
    private Integer port;

    /**
     * netty通信url，以/开头，例如：/chat 【必须】
     */
    private String url;

    /**
     * 点对点消息
     */
    private  boolean point2point;

    /**
     * 消息长度上限 【可选，默认64*1024】
     */
    private Integer msgLength;


    /**
     * 等待队列大小，【可选，默认128】
     */
    private Integer waitSize;


    public Integer getWaitSize() {
        return waitSize;
    }

    public void setWaitSize(Integer waitSize) {
        this.waitSize = waitSize;
    }

    public Integer getMsgLength() {
        return msgLength;
    }

    public void setMsgLength(Integer msgLength) {
        this.msgLength = msgLength;
    }

    public boolean isPoint2point() {
        return point2point;
    }

    public void setPoint2point(boolean point2point) {
        this.point2point = point2point;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
